package com.qingfeng.coupon.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @author zhangyuefei
 * @version 1.0
 * @date 2020/5/26 2:07 下午
 */
@ApiModel(value = "优惠券")
@Data
@TableName(value = "coupon")
public class Coupon {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键")
    private Long id;

    /**
     * 模版id
     */
    @TableField(value = "template_id")
    @ApiModelProperty(value = "模版id")
    private Long templateId;

    /**
     * 优惠券码
     */
    @TableField(value = "code")
    @ApiModelProperty(value = "优惠券码")
    private String code;

    /**
     * 领取时间
     */
    @TableField(value = "assign_time")
    @ApiModelProperty(value = "领取时间")
    private Date assignTime;

    /**
     * 使用状态1已使用/2未使用/已过期
     */
    @TableField(value = "status")
    @ApiModelProperty(value = "使用状态2已使用/1未使用/已过期")
    private Integer status;

    /**
     * 领取者id
     */
    @TableField(value = "user_id")
    @ApiModelProperty(value = "领取者id")
    private Long userId;

    /**
     * 店铺id
     */
    @TableField(value = "store_id")
    @ApiModelProperty(value = "店铺id")
    private Integer storeId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
}
